package com.freewater.springboot.demo.aop.advice.order.diffaspectclass;

import com.freewater.springboot.demo.aop.advice.order.SomeBusiness;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {

    // 处在不同的Aspect类文件中的相同Advice Type的advices 作用在相同的join point 时，根据Order来决定顺序
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
        applicationContext.registerShutdownHook();

        SomeBusiness someBusiness = applicationContext.getBean(SomeBusiness.class);
        someBusiness.doSomething("freewater");
    }
}
